package com.hckj.jianzhijia.popupwindows;

import android.content.Context;
import android.view.View;

/**
 * Created by 赵奇隆 on 2015-11-09.
 * 修改data数组，然后添加新的接口函数就可以进行扩展了
 */
public class JobApprovingPopWin extends ListPopupWindow  {


    public static final String[] data = {"修改","删除"};
    private PopWinInterface popWinInterface;
    private int listPosition;

    public JobApprovingPopWin(Context context, PopWinInterface popWinInterface, View parentView,int listPosition) {
        super(context, parentView, null, data);
        this.popWinInterface = popWinInterface;
        this.listPosition = listPosition;
    }

    @Override
    public void getListItem(int position, String itemName) {
        if(position==0){
            popWinInterface.jobModify(listPosition);
        }else{
            popWinInterface.jobDelete(listPosition);
        }
    }

    public interface PopWinInterface {
        public void jobModify(int position);
        public void jobDelete(int position);
    }





}
